import React, { Component } from 'react'
import './index.modules.css'
import Header from './components/Header'
import MyNavLink from './components/MyNavLink'
import Home from './pages/Home'
import About from './pages/About'
import { Redirect, Route, Switch } from 'react-router-dom';
// import { Button, ConfigProvider } from 'antd';


export default class App extends Component {
  render() {
    return (
      <div className='container'>
        <Header />
        <div>
          <MyNavLink to="/home" >Home</MyNavLink>
          <MyNavLink to="/about" >About</MyNavLink>
        </div>
        <Switch>
          <Route path="/home" component={Home} />
          <Route path="/about" component={About} />
          <Redirect to="/home" />
        </Switch>
      </div>
    )
  }
}